package com.example.player.dao;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;

import com.example.player.domain.entity.PlayList;

import java.util.List;

import io.reactivex.rxjava3.core.Completable;
import io.reactivex.rxjava3.core.Flowable;

/**
 * 歌单的dao层
 * @author 朱文权
 * */
@Dao
public interface PlayListDao {
    @Insert
    Completable insert(PlayList playList);
    @Query("select * from play_lists")
    Flowable<List<PlayList>> getAllLists();
    @Delete
    Completable delete(PlayList playList);
}
